﻿using Apex.EventBus.Options;
using Apex.EventBus.Handlers;

namespace WebApiTest.Events
{
    [EventName("UserCreated")]
    public class UserCreatedEventHandler : JsonIntegrationEventHandler<UserCreatedEvent>
    {
        public override Task HandleJson(string eventName, UserCreatedEvent? eventData)
        {
            Console.WriteLine($"消息响应>姓名：{eventData.UserName},年龄：{eventData.Age}");
            return Task.CompletedTask;
        }
    }
}
